<%@page import="com.mbbcpa.util.StringUtils"%>
<%@ page import = "java.io.*" %>
<%@ page import = "java.net.*" %>
<%@ page import = "java.text.*" %>
<%@ page import = "java.util.*" %>
<%@ page import = "java.util.Map" %>
<%@ page import = "java.util.HashMap" %>
<%@ page import="com.mbbcpa.app.manager.*" %>
<%@ page import="com.mbbcpa.app.EncryptionHelper" %>
<%@ page import="com.mbbcpa.app.EbppKeys" %>
<%@ page import="com.mbbcpa.util.*" %>
<%@ page import = "com.mbbcpa.security.dao.*" %>

<%
String msg = StringUtils.NullSafe((String) request.getAttribute("msg"));
String msg_id = StringUtils.NullSafe((String) request.getAttribute("msg_id"));

String userid = StringUtils.NullSafe((String) request.getAttribute("userid"));
String pass1 = StringUtils.NullSafe((String) request.getAttribute("pass1"));
String pass2 = StringUtils.NullSafe((String) request.getAttribute("pass2"));

boolean showParam = false;
String msgColor = "red";

if (msg_id.equalsIgnoreCase("MSG001") || msg_id.equalsIgnoreCase("MSG002"))
	showParam = true;

if (msg_id.equalsIgnoreCase("MSG999"))
	msgColor = "green";

ArrayList secGroupAccessList = (ArrayList) session.getAttribute(Constants.LOGON_ACCESS_LIST);
SecUserDao oSecUserDao = (SecUserDao) session.getAttribute(Constants.LOGGED_USER);
String sUserName = oSecUserDao.getUserName();
String lastLogonDateTime = (String) session.getAttribute(Constants.LAST_LOGON_DATETIME);
String selected = "sec008";
int iSec001 = 0;
int iSec002 = 0;
int iSec003 = 0;
int iSec004 = 0;
int iSec005 = 0;
int iSec006 = 0;
int iSec007 = 0;
int iSec008 = 0;

for(int i=0;i<secGroupAccessList.size();i++){
	SecAccessDao secaccessDao = (SecAccessDao)secGroupAccessList.get(i);
	String strModuleCode  = secaccessDao.getModuleCode();
	if(strModuleCode.equals("SEC001"))
		iSec001 = 1;
	if(strModuleCode.equals("SEC002"))
		iSec002 = 1;
	if(strModuleCode.equals("SEC003"))
		iSec003 = 1;
	if(strModuleCode.equals("SEC004"))
		iSec004 = 1;
	if(strModuleCode.equals("SEC005"))
		iSec005 = 1;
	if(strModuleCode.equals("SEC006"))
		iSec006 = 1;
	if(strModuleCode.equals("SEC007"))
		iSec007 = 1;
	if(strModuleCode.equals("SEC008"))
		iSec008 = 1;
}


%>

<html>
<head>
<link rel="stylesheet" href="resource/mbb_sec_global.css" type="text/css" />
<link href="resource/style.css" rel="stylesheet" type="text/css">

<script type="text/javascript">
	    window.history.forward();
	    function noBack() { window.history.forward(); }
	</script>
<style type="text/css"></style></head>


<SCRIPT LANGUAGE="JavaScript1.2">

	// Page Actions here...

</SCRIPT>
</head>


<%
	//on jsp load
%>

<body class="home" onload="noBack();" onpageshow="if (event.persisted) noBack();" onunload="">

	<a name="top"></a>
	
<!-- Header -->
<%@ include file="/jsp/common/Header.jsp" %>	
<!-- End Header -->

<div id="bgWrapper">
		<div id="container">
		
					<div id="titleBar">
						<ul class="topBar">
							<li class="goBackBt"><a href="<%=request.getContextPath()%>/ShowSecurityHome.do?dispatch=init"></a></li>
							<li>
							  <h1>Audit Trail</h1></li>
						</ul>
					</div>
		
					<div id="fullcontent">
		
						<!-- Security Navigation -->
						<%@ include file="SecurityNavigation.jsp" %>	
						<!-- End SecurityNavigation -->
			
			
						<div id="contentRightIn">
									
							<div id="moduleContainer">
							
							
									<!--  Module Title -->
									<table align="center" width=100% border="0" rules="cols" class="tblDetails">
										<thead>
											<tr>
												<th colspan="4">
													<h4>Audit Trail</h4>
												</th>
											</tr>
										</thead>
											
										<tr class="even">
											<td colspan="2" align="center" style="text-align:center !important;">
												This module shows the log.
												<p style="font-weight:bold;color: <%=msgColor%> !important;"><%=msg%></p>
											</td>
										</tr>
									</table>

									<!--  Audit Trail Parameters -->
									<form name="GetGroupLevelForm" action="" method="post">
										
										<table align="center" class="tblDetails" width=100% border="0" rules="cols">
											<thead class="th1">
												<tr>
													<th colspan="3">
														<div class="sectionTableTitle">
															<h3>Security Groups</h3>
														</div>
													</th>
											</thead>
											
											<tr class="headerD"  style="border: thin solid"	>
												 <td width="28%">Select Date:</td>
   												 <td width="72%">From: <input type="text" /> To: <input type="text" /></td>
											</tr>
											<tr class="headerD" style="border: thin solid">
											 	<td width="28%">Search By User: </td>
   											 	<td width="72%"><input type="text" /> <input type="submit" value="Get Report"/></td>
											</tr>
											
											</table>
										</Form>
								
								
									<!-- Audit Trail Data Table -->	
									<form name="frmAuditTrail" action="" method="post">
									<input type="hidden" name="sremgroup" value="">
									<table align="center" class="tbldetails" width=100% border="0" rules="cols">
										<thead class="th1">
											<tr>
												<th colspan="4">
													<div class="sectionTableTitle">
														<h3>Audit Log</h3>
													</div>
												</th>
										</thead>
										<tr class="headerD">
											<td width="20%" class="center_note">Date</td>
											<td width="60%" class="center_note">Event</td>
											<td width="20%" class="center_note">User ID</td>
										</tr>
										
									</table>
								</form>
									
							
							</div> <!--  moduleContainer END -->
						</div>
		
					<!-- Footer -->
					<%@ include file="/jsp/common/Footer.jsp" %>	
					<!-- End Footer -->
					</div>




</body>
</html>